In modern Web application development architecture, Web 2.0 technology is getting more popular and used to provide an end user with rich functionality and better user experience. As the most important part of Web 2.0, AJAX (Asynchronous JavaScript and XML) plays as a data converting and transferring center which bridges a browser and a server in an asynchronous way.
AJAX is a technology for developing and delivering the rich UI (user interface) over the Internet that has become increasingly popular. Specifically, AJAX is a client side technology that enables a UI event to propagate to the server at a more granular level compared to the document data model. Under this technical trend, traditional 3-layer Web application development architecture has certain drawbacks. For an AJAX enabled Web application, a lot of work is spent on data converting and transferring jobs between a browser, a server, and a backend system. This also makes subsequent extension and maintenance work very complicated and time consuming.
FIG. 1 is a block diagram illustrating a typical AJAX programming model. In this example, a frontend as a Web presentation layer includes an AJAX engine which communicates with a J2EE (Java 2 enterprise edition) engine as a mid-layer in an asynchronous manner. The mid-layer includes an enterprise connector or Java connector API (application programming interface) that handles specific function calls to certain RFC (remote function call) function module of a backend system.
FIGS. 2A-2B are block diagrams illustrating certain communications configurations between a mid-layer and a backend. As shown in FIG. 2A, communications between a mid-layer and a backend can be performed via a set of Java connection API (e.g., SAP Java connector or JCo). The Java connector such as SAP JCo is a toolkit that allows a Java application to communicate with a backend system. In addition, as shown in FIG. 2B, communications between a mid-layer and the backend can be performed using a Java proxy via an enterprise connector such as SAP enterprise connector. The enterprise connector is a development tool that provides help classes and RFC function module method calls for Java applications. These method calls and help classes are referred to as a Java proxy.
In order to use the functionality of AJAX engine, a user has to handle all AJAX specific calls which are fairly complicated. DWR (direct Web remoting) is a Java open source library which allows a user to develop AJAX Web sites. DWR works by dynamically generating JavaScript based on Java classes. The code does some AJAX magic to make it feel like the execution is happening on the client, but in reality the server is executing the code and DWR is marshalling the data back and forwards.
However, in order to use DWR to communicate with an enterprise backend system, significant amount of data conversion between the frontend and backend must be performed, which is sometimes tedious.